package no.ntnu.fp.services.impl;

import java.io.IOException;

import no.ntnu.fp.client.exceptions.NetworkException;
import no.ntnu.fp.messages.Message;
import no.ntnu.fp.messages.impl.GetMeetingRoomsMessage;
import no.ntnu.fp.net.co.Connection;
import no.ntnu.fp.services.MeetingRoomService;

public class MeetingRoomServiceImpl extends EntityServiceImpl implements MeetingRoomService {

	public MeetingRoomServiceImpl(Connection connection) {
		super(connection);
	}

	@Override
	public void fetchMeetingRooms() {
		Message message = new GetMeetingRoomsMessage();
		try {
			connection.send(message.toString());
		} catch (IOException ex) {
			throw new NetworkException("Could not fetch meeting rooms", ex);
		}
	}
}
